<%@page contentType="text/html;charset=UTF-8"%> 
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>

<!-- MODAL  SUA -->
<div class="modal fade s" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Sửa chi tiết phân công</h4>
</div>
<div class="modal-body">
	<form action="/QLKhoaCNTT/capnhatphancong"  method="post" class="form-horizontal" accept-charset="UTF-8">
		<div class="form-group">
				<label for="idphancong" class="col-lg-3 control-label">ID Phân công</label>
				<div class="col-lg-9">
				<input class="form-control" id="idphancong" name="idphancong" readonly type="text">
				</div>
			</div><!-- end form-group-->
		<div class="form-group">
			<label for="idcongvan" class="col-lg-3 control-label">Ký hiệu công văn</label>
			<div class="col-lg-9">
			<input class="form-control" id="idcongvan" name="idcongvan" readonly type="text">
			</div>
		</div><!-- end form-group-->

		<div class="form-group">
			<label for="trichYeu" class="col-lg-3 control-label">GV/BM được phân công</label>
			<div class="col-lg-9">
			<input class="form-control" id="duocphancong" name="idcongvan" readonly type="text">
			</div>
		</div>
		
		<div class="form-group">
			<label for="ngayNhan" class="col-lg-3 control-label">Người phân công</label>
			<div class="col-lg-9">
			 <input class="form-control" type="text" id="nguoiphancong" readonly>
			</div>
		</div><!-- end form-group-->
		
		<div class="form-group">
			<label for="ngayNhan" class="col-lg-3 control-label">Ngày phân công</label>
			<div class="col-lg-9">
			 <input class="form-control" type="text" id="ngayphancong" readonly>
			</div>
		</div><!-- end form-group-->
		
		<div class="form-group">
			<label for="ngayNhan" class="col-lg-3 control-label">Hạn chót</label>
			<div class="col-lg-9">
			 <input class="form-control" type="text" name="hancuoi" id="datepicker_hanchot">
			 <div class="checkbox">
          <label>
            <input type="checkbox" id="xacnhanhoantat" name="xacnhanhoantat" readonly> Xác nhận hoàn tất
          </label>
        </div>
        <div class="checkbox">
          <label>
            <input type="checkbox" id="xacnhanbcn" name="xacnhanbcn"> Xác nhận BCN
          </label>
        </div>
			</div>
		</div><!-- end form-group-->

		<button type="button" class="btn btn-default" data-dismiss="modal">Đóng</button>
		<button type="submit" class="btn btn-primary">Lưu</button>

	</form>
</div><!-- END modal-body -->
</div><!-- END modal-content -->
</div><!-- END modal-dialog modal-lg -->
</div><!-- END modal fade bs-example-modal-lg -->
<!-- END MODAL SUA -->

<a class="btn btn-primary" href="<c:url value='/baonghi' />">Trở về</a>
<c:if test="${!empty listPhieuBaobu}">
	<table class="table table-hover">
		<tr>
			<th width="80">Mã phiếu báo nghỉ</th>
			<th width="80">Sĩ số</th>
			<th width="80">Ngày bù</th>
			<th width="120">Xác nhận</th>
			<th width="80">Sửa </th>
			<th width="120">Xóa</th>
			
		</tr>
		<c:forEach items="${listPhieuBaobu}" var="baobu">
				<tr>
					<td>${baobu.idPhieuBaoBu}</td>
					<td>${baobu.siso}</td>
					<td><fmt:formatDate value="${baobu.ngayBu}" pattern="dd-MM-yyyy" /></td>
					<c:choose>
					<c:when test="${baobu.xacNhan == 1}">
						<td><input type="checkbox" id="xacnhan_tb" checked/></td>
					</c:when>
					<c:otherwise>
						<td><input type="checkbox" id="xacnhan_tb" /></td>
					</c:otherwise>
				</c:choose>
					<td><button type="button" class="btn btn-primary" data-toggle="modal" data-target=".s">Sửa</button></td>
					<td><a class="btn btn-primary" href="#">Xóa</a></td>
					 
				 </tr>
			</c:forEach>
	</table>
</c:if>

